package com.allwees.data.analysis.product.api;

import com.allwees.bs.core.modelbase.vo.R;
import com.allwees.data.analysis.product.sqlquery.SearchWordQuery;
import com.allwees.data.dataport.common.api.BaseApi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 *
 * @author yangylsky
 * @since 2020-04-07
 *
 */
@RestController
@RequestMapping("/data/api/analysis/product")
public class SearchWordApi extends BaseApi {
	@Autowired
	private SearchWordQuery actionLogQueryApi;

    @GetMapping("/search_hot_words")
    public R searchHotWords(Integer top) {
        return R.ok(actionLogQueryApi.searchHotWords(top == null ? 20 : top));
    }
}
